"""
Copyright 2009, Thomas Dejanovic, Jay Shurtz.
 
This is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this software; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA, or see the FSF site: http://www.fsf.org.

This is the most specific level of xml generation for register
hatchlings.  it contains information about how to generate and
write xml from the hatchling data structure.
"""

id = "$Id: hatch_html.py 667 2010-07-01 00:12:17Z jayshurtz $"
# $URL: http://hatch.googlecode.com/svn/tags/taggle_release_2.3/hatch/hatch_targets/hatch_html.py $
# $Author: jayshurtz $
version = " ".join(id.split()[1:3])

from os import extsep
import to_hatch_structure
from hatch_log import *
from hatch_constants import RTL


def generate(hatchNode, moduleName):
    """ Write out the complete html module description required to
        implement the registers described in the hatch datastructure.

        Note: RTL should not be formatted.

        'hatchNode' is the top node of the design.
        'moduleName' is the basename of the design file.
    """
    logger.info(self.generate.func_name + "(" + hatchNodeClassAndName(hatchNode) + ", " + str(moduleName) + ")")
    indent + "Uses the following rtl: <br><pre>" + hatchNode.properties[RTL] + "</pre>"


# TODO - built-in-self-test 
if __name__ == "__main__":
    #import hatch_history
    #hatch_history.setupSimpleHistory(histfile=__file__.replace('.py','.pyhist'), length=500)  # Setup history for this file.
    consoleHandler.setLevel(logging.DEBUG)

    pass


